package com.fdm.model.DAO;

import java.util.List;
import com.fdm.model.accounts._Account;
import com.fdm.model.exceptions.DAOException;

/**
*
* @author Alain.Brown
*/
public interface _AccountDAO 
{
	/**
	 * Retrieves _Account object with accountNumber
	 * @param accountNumber
	 * @return _Account
	 * @throws DAOException
	 */
	public _Account retrieve(int accountNumber) throws DAOException;
	
	/**
	 * Removes account with accountNumber
	 * @param accountNumber
	 * @throws DAOException
	 */
	public void delete(int accountNumber) throws DAOException;
	
	/**
	 * Update _Account attribute
	 * @param accountNumber
	 * @param attribute
	 * @param newValue
	 * @throws DAOException
	 */
	public void update (int accountNumber, Double newValue) throws DAOException;

	/**
	 * Create new _Account object
	 * @param newAccount
	 * @throws DAOException 
	 */
	public void create (_Account newAccount) throws DAOException;
	
	/**
	 * Retrieves all _Account objects
	 * @return List<_Account>
	 * @throws DAOException
	 */
	public List<_Account> retrieveAll() throws DAOException;
	
	/**
	 * Tests for the type of storage that has been implemented
	 * @return String
	 */
	public String getStorageType();
	
	/**
	 * Retrieve Maximum account number
	 * @return int
	 * @throws DAOException 
	 */
	public int getMaxAccountNumber() throws DAOException;
}
